<!--#include file="const.asp" -->
<!--#include file="common/funciton.asp" -->
<%
 'On Error Resume Next
	if Request.QueryString("page")="" then
		page =1
	else
		page = trim(Request.QueryString("page"))
	end if
	
	diarynum_=diarynum+1
	
		If Int(diarynum_/fyc) < diarynum_/fyc Then
			pagec = Int(diarynum_/fyc) + 1
		else
			pagec = Int(diarynum_/fyc)
		End If
	if page>pagec then page=pagec
	if Cint(diarynum)+1="0" then
	 response.write(readtext(skinf&"/boards/articlelist_none.html"))
	else
			if diarynum_ <= page*fyc then
				pagestart=(page-1)*fyc
				pageend=diarynum
			else
				pagestart=(page-1)*fyc
				pageend=page*fyc-1
			end if
			
			for i=pagestart to pageend
				i_=diarynum-i
				diary_id=GDInfo("diary_id",i_)
				diary_tittle=GDInfo("diary_tittle",i_)
				diary_time=GDInfo("diary_time",i_)
				diary_kind=GDInfo("diary_kind",i_)
				diary_path=GDInfo("diary_path",i_)
				diary_tags=GDInfo("diary_tags",i_)
				diary_un=GDInfo("diary_un",i_)
				diary_text=nohtml(readtext(diary_path))
				if ArticleModel<2 then 
					D_LinkUrl="article.asp?id="&diary_id
				else
					D_LinkUrl=replace(diary_path,"diary/","")&".html"
				end if
				
				if diary_yf =0 then 
					if cint(diary_yz)>0 then
					diary_text=CutStr(diary_text,diary_yz)
					end if
				else 
					if cint(diary_yh)>0 then
					diary_text=SplitLines(diary_text,diary_yh)
					end if
				end if

				keyWord = diary_tags
				keyWord = split(keyWord,",")
					For n= LBound(keyWord)  To UBound(keyWord)
						D_tags = D_tags&"  "&keyWord(n)
					Next
				articlelistfeed=readtext(skinf&"/boards/article_list_"&diary_lf&".html")
				articlelistfeed=replace(articlelistfeed,"<$D_Number$>",diary_id)
				articlelistfeed=replace(articlelistfeed,"<$D_Title$>",diary_tittle)
				articlelistfeed=replace(articlelistfeed,"<$D_Un$>",diary_un)
				articlelistfeed=replace(articlelistfeed,"<$D_time$>",diary_time)
				articlelistfeed=replace(articlelistfeed,"<$D_tags$>",D_tags)
				articlelistfeed=replace(articlelistfeed,"<$D_kd$>",diary_kind)
				articlelistfeed=replace(articlelistfeed,"<$D_Text$>",diary_text)
				articlelistfeed=replace(articlelistfeed,"<$D_LinkUrl$>",D_LinkUrl)
				response.write(articlelistfeed)
				D_tags=""					
			next
			dim pageContentfeed,pageContentfeeds,thispageContent,elsepageContent,elsepageContent_temp
			pageContentfeed=readtext(skinf&"/boards/pageContent/pageContent.html")
			thispageContent=readtext(skinf&"/boards/pageContent/thispage.html")
			elsepageContent=readtext(skinf&"/boards/pageContent/elsepage.html")

			for i=1 to pagec
			elsepageContent_temp=""
				if i=page then
				pageContentfeeds = pageContentfeeds & replace(thispageContent,"<$page_number$>",i)
				else
				elsepageContent_temp = replace(elsepageContent,"<$page_number$>",i)
				elsepageContent_temp = replace(elsepageContent_temp,"<$URL$>","default.asp?page="&i)
				pageContentfeeds=pageContentfeeds&elsepageContent_temp	
			end if

			next
			pageContentfeed=replace(pageContentfeed,"<$pageContents$>",pageContentfeeds)
			response.write(pageContentfeed)
		end if
%>
